package com.facebook.app.client.event;

import com.facebook.app.client.ClusteringMethod;
import com.google.gwt.event.shared.GwtEvent;

public class ClusterStrategyChosenEvent extends GwtEvent<ClusterStrategyChosenEventHandler>{
	
	public static final Type<ClusterStrategyChosenEventHandler> TYPE = new Type<ClusterStrategyChosenEventHandler>();
	
	private final ClusteringMethod clusteringMethod;
	
	public ClusterStrategyChosenEvent(ClusteringMethod clusteringMethod) {
		this.clusteringMethod = clusteringMethod;
	}
	
	public ClusteringMethod getClusteringMethod() {
		return clusteringMethod;
	}
	
	@Override
	public Type<ClusterStrategyChosenEventHandler> getAssociatedType() {
		return TYPE;
	}
	
	@Override
	protected void dispatch(ClusterStrategyChosenEventHandler handler) {
		handler.onClusterStrategyChosen(this);
	}
	
}
